<form action="" method="post" id="userInputForm">
 <input type="hidden" name="opt" value="searchcode" />
<input name="__RequestVerificationToken" type="hidden" value="<?php echo $key?>" />
Search location:
    <input type="text" class="commentInput required" id="locId" name="locId" style="width: 300px;" value="<?php echo $loc?>" />
    <input type="submit" value="Search" class="submit" style="width: 130px;" />
</form>
<table width="60%">
<?php
foreach($codes as $i=> $code)
{
?>
    <tr>
        <td id="code_<?php echo $i?>"><?php echo $code[0]?></td>
        <td><a href="#a" onclick="top.document.getElementById('CodeRss').value='<?php echo $code[0]?>';top.b.close()"><?php echo $code[1]?></a></td>
    </tr>
<?php
}
if(count($codes)==0 && $actPost=="searchcode")
{
    echo "<h3>not found</h3>";
}
?>
</table>